﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeLeaveSystem.Shared.Models {
    public class AddWOM {// 加班申请认定表
        public int Id { get; set; }
        public int StaffId { get; set; }
        public StaffInfo? Staff { get; set; }
        public DateTime Created { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public String Reason { get; set; } = String.Empty;

        public int? AcceptStaffId { get; set; } // 申请确认人标志
        public StaffInfo? AcceptStaff { get; set; }

        public AddWOMType Type { get; set; } // 类型
        public AddWOMAcceptTag AcceptTag { get; set; } //当前进度状态
        public static String AddWOMTypeToString(AddWOMType wom) {
            switch (wom) {
                case AddWOMType.工作日加班: {
                        return "工作日加班";
                    }
                case AddWOMType.周末加班: {
                        return "周末加班";
                    }
                case AddWOMType.节假日加班: {
                        return "节假日加班";
                    }
            }
            return "未知类型";
        }
    }
    public enum AddWOMAcceptTag { 审核中 = 1, 已通过, 拒绝 }
    public enum AddWOMType {
        [Display(Name = "工作日加班")]
        工作日加班 = 1,
        [Display(Name = "周末加班")]
        周末加班,
        [Display(Name = "节假日加班")]
        节假日加班
    }
}
